<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="D:\Developer\workspace\gupaoedu-vip-pattern\src\main\resources\plugins\jquery\jquery-1.11.0.min.js"></script>
    <script>

        $(function () {
            // alert($('#test').html());
            var array = ['a','b','c'];
            //1、遍历array方法一
            console.log("----------- 方法一 --------------");
            for(var i=0; i<array.length; i++){
                console.log(array[i]);
            }

            console.log("----------- 方法二 --------------");
            for(var item in array){
                console.log(item); // 0  1 2 3 4
            }

            console.log("----------- 方法三 --------------");
            array.forEach(function (value) {
                console.log(value);  // a b c
            });

            console.log("test-----------------");
            add(array);
            console.log(array);

            console.log("========1=========");
            var arrayTest = []
            if(arrayTest){
                if(arrayTest.length > 5){
                    console.log(123);
                }else{
                    console.log('不存在');
                }
            }

            console.log('结束');

            var filter = ['eq', ['$', 'item.properties.DataStandardId'], ['s', 'V2012']];
            console.log(JSON.stringify(filter));
            console.log(typeof JSON.stringify(filter));


        });

        function add(array) {
            array.push("test");
        }


    </script>
</head>
<body>
    <p id="test">测试文本</p>

</body>
</html>